<template>
	<view class="cont">
		<view class="bottom-bar shadow">
			<slot></slot>
			<view class="confirm-btn bg-green" @click="onSubmit">{{buttonText}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			buttonText: {
				type: String,
				default: '按钮'
			}
		},
		data() {
			return {

			};
		},
		methods: {
			onSubmit() {
				this.$emit('submit')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.cont {
		height: 130upx;
	}

	.bottom-bar {
		height: 100upx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		box-sizing: border-box;
		z-index: 100;
		background-color: #fff;

		.confirm-btn {
			height: 100%;
			flex: 1;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #fff;
			font-size: 36upx;
		}
	}
</style>
